/*
 * @Author: ShaXin
 * @Date: 2022-01-06 15:25:10
 * @LastEditors: tc
 * @LastEditTime: 2022-03-07 15:32:14
 */
import request from '../utils/request'

const bbcApi = {}
// 巡检单分页查询
bbcApi.findByPageList = (params) => {
    return request({
        url: '/check/findByPageList',
        method: 'get',
        params:params
    })
}
// 根据地区编码查询水库
bbcApi.findByCode = (params) => {
    return request({
        url: '/web/baseinfo/equipment/findByCode',
        method: 'get',
        params:params
    })
}

// 巡检单编辑
bbcApi.editCheck = (params) => {
    return request({
        url: '/check/editCheck',
        method: 'post',
        data:params
    })
}
// 巡检单添加
bbcApi.saveCheck = (params) => {
    return request({
        url: '/check/saveCheck',
        method: 'post',
        data:params
    })
}
// 根据id查看巡检单
bbcApi.getById = (params) => {
    return request({
        url: '/check/getById',
        method: 'get',
        params:params
    })
}

// 故障单分页查询
bbcApi.faultFindByPageList = (params) => {
    return request({
        url: '/fault/findByPageList',
        method: 'get',
        params:params
    })
}
// 故障单id生成维修单
bbcApi.addRpaire = (params) => {
    return request({
        url: '/fault/addRpaire',
        method: 'get',
        params:params
    })
}
// 故障单id查看故障单
bbcApi.faultGetById = (params) => {
    return request({
        url: '/fault/getById',
        method: 'get',
        params:params
    })
}


// 维修单分页查询
bbcApi.repairFindByPageList = (params) => {
    return request({
        url: '/repair/findByPageList',
        method: 'get',
        params:params
    })
}
// 根据主键id查询维修单
bbcApi.getRepairById = (params) => {
    return request({
        url: '/repair/getById',
        method: 'get',
        params:params
    })
}
// 维修单单编辑
bbcApi.editRepair = (params) => {
    return request({
        url: '/repair/editRepair',
        method: 'post',
        data:params
    })
}

//用户下拉数据
bbcApi.userselect = (params) => {
    return request({
        url: '/system/sysuser/userselect',
        method: 'get',
        params:{}
    })
}
// 配件下拉
bbcApi.partsSelectList = (params) => {
    return request({
        url: '/parts/selectlist',
        method: 'get',
        params:{}
    })
}


bbcApi.findById = (params) => {
    return request({
        url: `/web/baseinfo/equipment/findById/${params}`,
        method: 'get',
        params:{}
    })
}
bbcApi.deleteInfo = (params) => {
    return request({
        url: `/web/baseinfo/equipment/delete/${params}`,
        method: 'DELETE',
        params:{}
    })
}

//短信内容 分页查询
bbcApi.findNoterByPageList = (params) => {
    return request({
        url: '/note/findNoterByPageList',
        method: 'get',
        params:params
    })
}
//短信内容 水库下拉菜单
bbcApi.stationSelect = (params) => {
    return request({
        url: '/note/stationSelect',
        method: 'get',
        params:{}
    })
}


export default bbcApi